package com.star.main;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.star.common.CommonApp;

public class Main {

	private static ApplicationContext content;

	public static void main(String[] args) {
		 init();
		synchronized (Main.class) {
			while (true) {
				try {
					Main.class.wait();
				} catch (Throwable e) {
					e.printStackTrace();
				}
			}
		}
	}

	private static void init() {
		content = new ClassPathXmlApplicationContext("classpath*:spring/*.xml",
				"classpath*:mybatis/*.xml");
		CommonApp app = (CommonApp) content.getBean("newsApp");
		app.execute();
	}
}
